These are general C questions for the most part.

1. You seem to be asking why the person who wrote the code passed in parameters that aren't used. I really don't know. Brain damage? You would have to ask their therapist. On the other hand, the 4th-last parameter to CreateWindowEx is the parent window handle, so it could be used there instead of just passing NULL.

2. Functions have types just like variables. You can, for instance, pass a function to another function (which is exactly what you're doing in passing your WndProc and DialogProc functions as a "callback" functions). The function name is essentially a pointer to the function's starting point.

Code:
#include <stdio.h>

// f is a pointer to a function that takes 2 ints and returns an int.
int func(int (*f) (int, int), int a, int b) {
    return f(a, b);
}

int add(int a, int b) { return a + b; }

int mul(int a, int b) { return a * b; }

int main() {
    printf("%d\n", func(add, 3, 5));  // prints 8
    printf("%d\n", func(mul, 3, 5));  // prints 15
    return 0;
}
You can even typedef the type:
Code:
typedef int (* MathFunc ) (int, int)

int func(MathFunc f, int a, int b) {
    return f(a, b);
}
3. This question is pretty much incomprehensible. An "instance" is a running program. I don't see what you're asking, but it seems to have nothing to do with the typecast.